<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>用户登录界面</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="author" content="DeathGhost" />
<link href="style/style.css" rel="stylesheet" type="text/css" />
<!-- <script type="text/javascript" src="js/public.js"></script> -->
<!-- <script type="text/javascript" src="js/jqpublic.js"></script> -->
<!-- <script src="js/bootstrap.min.js"></script> -->
<script type="text/javascript" src="js/jquery.js"></script>

<!-- 注意一下引入顺序 -->
<script src="js/jquery-2.0.3.js"></script>
<script src="js/jquery.cookie.js"></script>
<script type="text/javascript">
	function changeYZM() {
		//获取图片，修改图片的地址
		$("#YZM").attr("src", "random.jpg?time=" + new Date().toLocaleString());
	}
</script>

</head>
<body>
	<header>
		<section class="Topmenubg">
			<div class="Topnav">
				<div class="LeftNav">
					<a href="register.html">注册</a>/<a href="user_login.jsp">登录</a><a
						href="#">QQ客服</a><a href="#">微信客服</a><a href="#">手机客户端</a>
				</div>
				<div class="RightNav">
					<a href="user_center.html">用户中心</a> <a href="user_orderlist.html"
						target="_blank" title="我的订单">我的订单</a> <a href="cart.html">购物车（0）</a>
					<a href="user_favorites.html" target="_blank" title="我的收藏">我的收藏</a>
					<a href="#">商家入驻</a>
				</div>
			</div>
		</section>
		<div class="Logo_search">
			<div class="Logo">
				<img src="images/logo.jpg" title="DC" alt="meishi"> <i></i> <span>西安市
					[ <a href="#">莲湖区</a> ]
				</span>
			</div>
			<div class="Search">
				<form method="get" id="main_a_serach"
					onsubmit="return check_search(this)">
					<div class="Search_nav" id="selectsearch">
						<a href="javascript:;"
							onClick="selectsearch(this,'restaurant_name')" class="choose">餐厅</a>
						<a href="javascript:;" onClick="selectsearch(this,'food_name')">食物名</a>
					</div>
					<div class="Search_area">
						<input type="search" id="fkeyword" name="keyword"
							placeholder="请输入您所需查找的餐厅名称或食物名称..." class="searchbox" /> <input
							type="submit" class="searchbutton" value="搜 索" />
					</div>
				</form>
				<p class="hotkeywords">
					<a href="#" title="酸辣土豆丝">酸辣土豆丝</a><a href="#" title="这里是产品名称">螃蟹炒年糕</a><a
						href="#" title="这里是产品名称">牛奶炖蛋</a><a href="#" title="这里是产品名称">芝麻酱凉面</a><a
						href="#" title="这里是产品名称">滑蛋虾仁</a><a href="#" title="这里是产品名称">蒜汁茄子</a>
				</p>
			</div>
		</div>
		<nav class="menu_bg">
			<ul class="menu">
				<li><a href="index.html">首页</a></li>
				<li><a href="list.html">订餐</a></li>
				<li><a href="category.html">积分商城</a></li>
				<li><a href="article_read.html">关于我们</a></li>
			</ul>
		</nav>
	</header>
	<!--Start content-->
	<section class="Psection MT20">
		<form action="UserLoginServlet" method="POST">
			<table class="login">
				<tr>
					<td width="40%" align="right" class="FontW">账号：</td>
					<td><input type="text" name="username" id="username"
						placeholder="请输入账号" required></td>
				</tr>
				<tr>
					<td width="40%" align="right" class="FontW">密码：</td>
					<td><input type="password" name="userpsw" id="userpsw"
						placeholder="请输入密码" required></td>
				</tr>
				<tr>
					<td width="40%" align="right" class="FontW">验证码：</td>
					<td><span><input type="text" name="YZM" id=""
							placeholder="请输入验证码"></span> <img src="random.jpg" id="YZM"
						onclick="changeYZM()"
						style="margin-left: 8px; vertical-align: bottom" width="83"
						height="36"></td>
				</tr>
				<tr>
					<td width="40%" align="right"></td>
  <td><input type="checkbox" value="rememberme" name="cksremember"
						id="cksremember" checked>记住密码<br />
  </td>
  </tr>
  <tr>
  <td width="40%" align="right"></td>
  <td><input type="submit" value="登 录" class="Submit_b">( 已经是***会员，<a
						href="#" class="BlueA">请登录</a> )</td>
  </tr>
  <!-- 隐藏域传递op的值给servlet，会根据op的值判断后续的操作 -->
				<input type="hidden" name="op" value="user_login">
				</table>
 </form>
</section>
<!--End content-->
<div class="F-link">

 </div>
<footer>
 <section class="Otherlink">
  <aside>
   <div class="ewm-left">
    <p>手机扫描二维码：</p>
    <img src="images/Android_ico_d.jpg">
    <img src="images/iphone_ico_d.jpg">
   </div>
   <div class="tips">
    <p>客服热线</p>
    <p>
						<i>1830927**73</i>
					</p>
    <p>配送时间</p>
    <p>
						<time>09：00</time>~<time>22:00</time>
					</p>
    <p>网站公告</p>
   </div>
  </aside>
  <section>
    <div>
    <span><i class="i1"></i>配送支付</span>
    <ul>
     <li><a href="article_read.html" target="_blank" title="标题">支付方式</a></li>
     <li><a href="article_read.html" target="_blank" title="标题">配送方式</a></li>
     <li><a href="article_read.html" target="_blank" title="标题">配送效率</a></li>
     <li><a href="article_read.html" target="_blank" title="标题">服务费用</a></li>
    </ul>
    </div>
    <div>
    <span><i class="i2"></i>关于我们</span>
    <ul>
     <li><a href="article_read.html" target="_blank" title="标题">招贤纳士</a></li>
     <li><a href="article_read.html" target="_blank" title="标题">网站介绍</a></li>
     <li><a href="article_read.html" target="_blank" title="标题">配送效率</a></li>
     <li><a href="article_read.html" target="_blank" title="标题">商家加盟</a></li>
    </ul>
    </div>
    <div>
    <span><i class="i3"></i>帮助中心</span>
    <ul>
     <li><a href="article_read.html" target="_blank" title="标题">服务内容</a></li>
     <li><a href="article_read.html" target="_blank" title="标题">服务介绍</a></li>
     <li><a href="article_read.html" target="_blank" title="标题">常见问题</a></li>
     <li><a href="article_read.html" target="_blank" title="标题">网站地图</a></li>
    </ul>
    </div>
  </section>
 </section>
<div class="copyright">© 版权所有 2020 与食俱进 技术支持：<a
				href="http://www.baidu.com" title="DC">与食俱进</a>
		</div>
</footer>
</body>
<script type="text/javascript" src="js/duanxin.js"></script>
<script>
	$(function() {
		//("#username").blur 文本框失去焦点事件
		$("#username").blur(function() {
			//读取用户名和密码的cookie信息
			var username = $.cookie('username');
			var userpsw = $.cookie('userpsw');

			console.log(userpsw);
			//如果用户输入的用户名 和 读取用户名一致
			if ($(this).val() == username) {
				//将密码显示在密码框中
				$("#userpsw").val(userpsw);
			}

		});

	})
</script>

</html>